function actualizeChoiceButtons() {
    jQuery("button.choicebutton").click(function() {
        var buttonName = this.name;
        jQuery("button.choicebutton[name='" + buttonName + "']")
            .attr("disabled", "disabled")
            .addClass("selected")
        ;
        jQuery(this).addClass("thisselected");
    });
}

jQuery(document).ready(function() {
    actualizeChoiceButtons();
});
